<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .y{
            width: 600px;
            height: 600px;
            margin: 0 auto;
            background-color: rgb(138, 16, 16);
            position: relative;
        }
        .u{
            width: 400px;
            height: 200px;
            background-color: rgb(130, 187, 25);
            
        }
        p{
            width: 100px;
            height: 200px;
            background-color: rgb(46, 27, 216);
        }
        .w{
            width: 300px;
            height: 0px;
            background-color: rgb(22, 163, 85);
            position: absolute;
            top: 200px;
            left: 0;
            transition: 0.3s;
            overflow: hidden;
            /* display: none; */
        }
        .y:hover .w{
            height: 300px;
            /* display: block; */
        }
    </style>
</head>
<body>
    <div class="y">
        <div class="u">
            <p>1222</p>
        </div>
        <div class="w"></div>
    </div>
</body>
</html>